import cn.hutool.core.util.StrUtil;

import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class base64test {
    public static void main(String[] args) {
        String data = "{“mobile”:”15173378822”,”relId”:”客户BP”,”title”:”活动消息”,”msgType”:”A1”,”content”:”慧用能活动消息推送测试”,”uri”:”https://test.greatgas.cn/new/open/ws/messageSend/jpush\",\"msgStyleType\":\"S2\"}";
        String s = Base64.getEncoder().encodeToString(data.getBytes(StandardCharsets.UTF_8));
        System.out.println(data);
        System.out.println(s);
        System.out.println(new String(Base64.getDecoder().decode(s),StandardCharsets.UTF_8));

        String str="本月-4日,次月-3日";
        String regex = "^本月-\\d*日"; //正则表达式
        Pattern pattern = Pattern.compile(regex);
        Matcher m = pattern.matcher(str);
        if(m.find()){
            System.out.println(m.group());
        }
        System.out.println(StrUtil.subBetween(str, "本月-", "日"));


    }
}
